package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HatchetAnnouncementMapper;
import com.ruoyi.system.domain.HatchetAnnouncement;
import com.ruoyi.system.service.IHatchetAnnouncementService;
import com.ruoyi.common.support.Convert;

/**
 * 公告管理 服务层实现
 * 
 * @author ruoyi
 * @date 2019-03-21
 */
@Service
public class HatchetAnnouncementServiceImpl implements IHatchetAnnouncementService 
{
	@Autowired
	private HatchetAnnouncementMapper hatchetAnnouncementMapper;

	/**
     * 查询公告管理信息
     * 
     * @param id 公告管理ID
     * @return 公告管理信息
     */
    @Override
	public HatchetAnnouncement selectHatchetAnnouncementById(String id)
	{
	    return hatchetAnnouncementMapper.selectHatchetAnnouncementById(id);
	}
	
	/**
     * 查询公告管理列表
     * 
     * @param hatchetAnnouncement 公告管理信息
     * @return 公告管理集合
     */
	@Override
	public List<HatchetAnnouncement> selectHatchetAnnouncementList(HatchetAnnouncement hatchetAnnouncement)
	{
	    return hatchetAnnouncementMapper.selectHatchetAnnouncementList(hatchetAnnouncement);
	}
	
    /**
     * 新增公告管理
     * 
     * @param hatchetAnnouncement 公告管理信息
     * @return 结果
     */
	@Override
	public int insertHatchetAnnouncement(HatchetAnnouncement hatchetAnnouncement)
	{
	    return hatchetAnnouncementMapper.insertHatchetAnnouncement(hatchetAnnouncement);
	}
	
	/**
     * 修改公告管理
     * 
     * @param hatchetAnnouncement 公告管理信息
     * @return 结果
     */
	@Override
	public int updateHatchetAnnouncement(HatchetAnnouncement hatchetAnnouncement)
	{
	    return hatchetAnnouncementMapper.updateHatchetAnnouncement(hatchetAnnouncement);
	}

	/**
     * 删除公告管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteHatchetAnnouncementByIds(String ids)
	{
		return hatchetAnnouncementMapper.deleteHatchetAnnouncementByIds(Convert.toStrArray(ids));
	}
	
}
